<form id="add-form" class="form-horizontal  nice-validator n-default n-bootstrap"  data-toggle="validator" method="POST" action="{:url('menjin/detail')}" >

    <div class="form-group">
        <label for="title" class="control-label col-xs-12 col-sm-2">门禁编号:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="text" name="name" id="name" class="form-control" value="{$menjin.name}">
        </div>
    </div>
    <div class="form-group">
        <label for="store_id" class="control-label col-xs-12 col-sm-2">选择店铺:</label>
        <div class="col-xs-12 col-sm-8">
            <select name="store_id" >
                <option value="0">请选择</option>
                {foreach name='$store' item='vo'}
                {if condition="$vo.id eq $menjin.store_id"}
                <option value="{$vo.id}" selected>{$vo.store_name}</option>
                {else/}
                <option value="{$vo.id}">{$vo.store_name}</option>
                {/if}
                {/foreach}
            </select>
        </div>
    </div>
    <input type="hidden" name="id" value="{$menjin.id}">
    <div class="form-group">
        <label for="type" class="control-label col-xs-12 col-sm-2">门禁类别:</label>
        <div class="col-xs-12 col-sm-8">
            <select name="type" >
                <option value="0">请选择</option>
                {if condition='$menjin.type eq 1'}
                <option value="1" selected>进门</option>
                {else/}
                <option value="1" >进门</option>
                {/if}
                {if condition='$menjin.type eq 2'}
                <option value="2" selected>出门</option>
                {else/}
                <option value="2" >出门</option>
                {/if}
                {if condition='$menjin.type eq 3'}
                <option value="3" selected>进出门</option>
                {else/}
                <option value="3">进出门</option>
                {/if}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label for="uname" class="control-label col-xs-12 col-sm-2">门禁状态:</label>
        <div class="col-xs-12 col-sm-8">
            <select name="state" >
                {if condition="$menjin.state eq 1"}
                <option value="1" selected>启用</option>
                <option value="2">禁用</option>
                {else/}
                <option value="1" >启用</option>
                <option value="2" selected>禁用</option>
                {/if}
            </select>
        </div>
    </div>
    <div class="form-group layer-footer">
        <div class="col-xs-2"></div>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed">提交</button>
            <button type="reset" class="btn btn-default btn-embossed"><a href="{:url('menjin/index')}">返回</a></button>
        </div>
    </div>
</form>
<!-- 配置文件 -->
<script type="text/javascript" src="/assets/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="/assets/ueditor/ueditor.all.js"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
    var editor = UE.getEditor('container');
</script>
